package com.neusoft.shopping.manager.service;

import com.neusoft.shopping.manager.comm.Page;
import com.neusoft.shopping.manager.dao.GoodsDaAOImpl;
import com.neusoft.shopping.manager.entity.GoodsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsService {
    @Autowired
    private GoodsDaAOImpl dao;

    public Page<GoodsEntity> queryAll(Page<GoodsEntity> page){
        return dao.queryAll(page);
    }

    public List<GoodsEntity> queryAlll(){
        return dao.queryAlll();
    }

    public GoodsEntity getGoodsByOne(Integer goodsno){

        return dao.getGoodsByOne(goodsno);
    }

    public GoodsEntity querylast(){
        return dao.querylast();
    }

    public int add_goods(GoodsEntity g){
     return dao.add_Goods(g);
    }

    public int update_goods(GoodsEntity g){
        return dao.update_Goods(g);
    }

    public int del_goods(Integer goodsno)
    {
        return dao.del_Goods(goodsno);
    }

}
